/**
 * Dashboard Base
 * All dashboard objects 'extend' this class
 *
 * @author Seth
 * @version 0.6
 */
var Dashboard = function() {
	var store = {
		location: 'dashboard'

	// construct
	}, __construct = function(u, l) {
		// set location
		store.location = l;

		// we need this jquery plugin
		Petolio.loadJs('jquery/jquery.data.min.js');

		// load post only if we have the post div present
		if($('div.post_entry').length > 0)
			Petolio.loadJs('dashboard/post.js');

		// load the rest
		Petolio.loadJs('dashboard/share.js');
		Petolio.loadJs('dashboard/privacy.js');
		Petolio.loadJs('dashboard/privacy.custom.js');
		Petolio.loadJs('dashboard/main.js');

		// init options only if we have the context menu div present
		if($('a.dash', 'div.context > div.in').length > 0)
			Petolio.loadJs('dashboard/options.js');

		// init translate
		Petolio.loadJs('dashboard/translate.js');

		// init post only if we have the post div present
		if($('div.post_entry').length > 0)
			Dashboard.Post.init();

		// init privacy, main and options
		Dashboard.Privacy.init();
		Dashboard.Main.init(u);

		// init options only if we have the context menu div present
		if($('a.dash', 'div.context > div.in').length > 0)
			Dashboard.Options.init();
	};

	// public
	return {
		load: __construct,
		store: function() {
			return store;
		}
	};
}();